package com.example.demo.test.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.demo.test.entity.Gsmdata;
import com.example.demo.test.service.IGsmdataService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author auth
 * @since 2021-07-01
 */
@RestController
@RequestMapping("/gsmData")
public class GsmDataController {

    @Autowired
    private IGsmdataService gsmDataService;

    @GetMapping("/get")
    @ApiOperation(value = "获取GSM数据")
    @Cacheable(value = "gsm", key = "1000", sync = true)
    public List<Gsmdata> getGsmData() {
        return gsmDataService.list();
    }

}

